<template>
	<view class="container">
		<customNav>
			<view style="display: flex; align-items: center;" @click="goBack">
				<uni-icons type="left" size="28"></uni-icons>
				<text class="size18" style="margin-left: 16rpx;">用户服务协议</text>
			</view>
		</customNav>
		<view class="content" >
			 <web-view :src="externalUrl"></web-view>
		</view>
	</view>
</template>

<script>
	import env from "@/config/env.js";
	import customNav from "@/components/nav/index.vue"
	export default {
		components: {
			customNav
		},
		data() {
			return {
				allHeight: "",
				externalUrl: "",
			};
		},
		onShow() {
			this.externalUrl = env.baseUrl + "/page/daotehe/daotehe_xy.html";
			let that = this
			// 获取系统信息
			uni.getSystemInfo({
				success: (res) => {
					// 获取状态栏高度
					const statusBarHeight = res.statusBarHeight;
					// 计算导航栏高度，这里假设导航栏内容高度为 44px
					const navBarHeight = 44;
					const paddingTop = statusBarHeight
					that.allHeight = statusBarHeight + navBarHeight
				}
			});
		},
		methods: {
			goBack() {
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style scoped>
	.content {
		width: 100%;
	}
</style>